import moment from 'moment'
// 查看付款-社保
export const LookPayListThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  {
    title: '状态',
    key: 'unitName',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      let arr = {'1':'待申请','2':'已申请','3':'已付款','4':'待付款','-1':'已驳回','-2':'已退回'}
      const text = arr[params.row.status]
      return h('span', text)
    }
  },
  {
    title: '审批结果',
    key: 'workFlowStatus',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '收款单位',
    // key: 'accountName',
    key: 'unitName',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '开户行',
    key: 'accountBank',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '收款账号',
    key: 'accountNo',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款方式',
    key: 'payType',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '请款金额',
    key: 'applyTotal',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款说明',
    key: 'remark',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款人',
    key: 'payUser',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款金额',
    key: 'total',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款时间',
    key: 'payDate',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.payDate ? moment(params.row.payDate).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '付款银行',
    key: 'payBank',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '退回时间',
    key: 'backTime',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.backTime ? moment(params.row.backTime).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '退回原因',
    key: 'backRemark',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '操作',
    key: 'action',
    fixed: 'right',
    slot: 'action',
    width: 280,
    align: 'center'
  }
]

// 确认付款-社保
export const PayListThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  {
    title: '状态',
    key: 'unitName',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      let arr = {'1':'待申请','2':'已申请','3':'已付款','4':'待付款','-1':'已驳回','-2':'已退回'}
      const text = arr[params.row.status]
      return h('span', text)
    }
  },
  {
    title: '审批结果',
    key: 'workFlowStatus',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '收款单位',
    // key: 'accountName',
    key: 'unitName',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '开户行',
    key: 'accountBank',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '收款账号',
    key: 'accountNo',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款方式',
    key: 'payType',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '请款金额',
    key: 'applyTotal',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款说明',
    key: 'remark',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款人',
    key: 'payUser',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款金额',
    key: 'total',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '付款时间',
    key: 'payDate',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.payDate ? moment(params.row.payDate).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '付款银行',
    key: 'payBank',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '退回时间',
    key: 'backTime',
    tooltip: true,
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.backTime ? moment(params.row.backTime).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '退回原因',
    key: 'backRemark',
    tooltip: true,
    minWidth: 150
  },
  {
    title: '操作',
    key: 'action',
    slot: 'action',
    width: 280,
    // fixed: 'right',
    align: 'center'
  }
]

// 流程审批单
export const AuditDetailThead = [
  {
    title: '步骤名称',
    key: 'stepName',
    tooltip: true,
    minWidth: 120
  },
  {
    title: '发起人',
    key: 'createrName',
    tooltip: true,
    minWidth: 120
  },
  {
    title: '发送时间',
    key: 'createTime',
    tooltip: true,
    minWidth: 120,
    render: (h, params) => {
      const text = params.row.createTime ? moment(params.row.createTime).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '审批人',
    key: 'operatorName',
    tooltip: true,
    minWidth: 120
  },
  {
    title: '审批时间',
    key: 'operatTime',
    tooltip: true,
    minWidth: 120,
    render: (h, params) => {
      const text = params.row.operatTime ? moment(params.row.operatTime).format('YYYY-MM-DD') : ''
      return h('span', text)
    }
  },
  {
    title: '状态',
    key: 'status',
    tooltip: true,
    minWidth: 120
  },
  {
    title: '备注',
    key: 'remark',
    tooltip: true,
    minWidth: 120
  },
]